const validate= {
	checkPhone: function  (phoneNumber){
	    if(!(/^1[3456789]\d{9}$/.test(phoneNumber))){ 
	        return false; 
	    } 
		return true
	},
  checkIdcard:function(idcard){
    if(!(/^\d{17}([0-9]|X)$/.test(idcard))){
          return false; 
      } 
    return true
  },
  checkEmail:function(email){
    if(!(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(email))){
          return false; 
      } 
    return true
  },
  // 密码长度要大于6位，由数字和字母组成
  checkPwd:function(pwd){
    if(!(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}$/.test(pwd))){
          return false; 
      } 
    return true
  }
}

export {
	validate
}